#include "BaseIrDecoder.h"


BaseIrDecoder::BaseIrDecoder( ILoggerPtr logger, PublisherPtr publisher ) : m_Logger(logger), m_Publisher(publisher)
{
	m_LastCode = 0;
	m_LastTime = 0;
	
	m_RepeatCount = 0;
	m_KbdFirstRepeat = 750;
	m_KbdNextRepeats = 350;
	reset();
}

void BaseIrDecoder::reset()
{
    m_DetectState = DETECT_HEADER_PULSE;
    m_Bit = 0;
	m_HalfBit = 0;
	m_Header = 0;
	m_Code = 0;
	
	m_LongPulse = false;
	m_LongSpace = false;
}

